package test.com.sms.selenium.singlepoint.util;

import org.openqa.selenium.By;

import test.com.sms.selenium.framework.SeleniumPageUtil;
import test.com.sms.selenium.util.SeleniumUtil;

public class SpReportsCustomReportsCobAssetReportPageUtil extends SeleniumPageUtil {
	public final static By RCRCAR_SPAN_HEADER = By.id("ctl44_Report_Header_lblHeader");
	
	public final static By RCRCAR_IMG_EXPORT = By.id("ctl44_Report_Header_imgExcelExport");
	
	public final static By RCRCAR_TD_PAGE = By.xpath("//*[@id='form1']/table/tbody/tr[2]/td/div/table[2]/tbody/tr/td[1]");
	public final static By RCRCAR_SPAN_PAGE_START_NO = By.id("ctl44_Report_PagingTop_lblPagingPageNumber");
	public final static By RCRCAR_TD_OF = By.xpath("//*[@id='form1']/table/tbody/tr[2]/td/div/table[2]/tbody/tr/td[3]");
	public final static By RCRCAR_SPAN_PAGE_COUNT = By.id("ctl44_Report_PagingTop_lblPagingPageCount");
	
	public final static By RCRCAR_INPUT_FIRST = By.id("ctl44_Report_PagingTop_imgFirst");
	public final static By RCRCAR_INPUT_PREVIOUS = By.id("ctl44_Report_PagingTop_imgPrevious");
	public final static By RCRCAR_INPUT_NEXT = By.id("ctl44_Report_PagingTop_imgNext");
	public final static By RCRCAR_INPUT_LAST = By.id("ctl44_Report_PagingTop_imgLast");
	
	public final static By RCRCAR_IMG_FILTER_0 = By.id("ctl44_Report_filter_0");
	public final static By RCRCAR_IMG_FILTER_1 = By.id("ctl44_Report_filter_1");
	public final static By RCRCAR_IMG_FILTER_2 = By.id("ctl44_Report_filter_2");
	public final static By RCRCAR_IMG_FILTER_3 = By.id("ctl44_Report_filter_3");
	public final static By RCRCAR_IMG_FILTER_4 = By.id("ctl44_Report_filter_4");
	public final static By RCRCAR_IMG_FILTER_5 = By.id("ctl44_Report_filter_5");
	public final static By RCRCAR_IMG_FILTER_6 = By.id("ctl44_Report_filter_6");
	public final static By RCRCAR_IMG_FILTER_7 = By.id("ctl44_Report_filter_7");
	public final static By RCRCAR_IMG_FILTER_8 = By.id("ctl44_Report_filter_8");
	public final static By RCRCAR_IMG_FILTER_9 = By.id("ctl44_Report_filter_9");
	public final static By RCRCAR_IMG_FILTER_10 = By.id("ctl44_Report_filter_10");
	public final static By RCRCAR_IMG_FILTER_11 = By.id("ctl44_Report_filter_11");
	public final static By RCRCAR_IMG_FILTER_12 = By.id("ctl44_Report_filter_12");
	public final static By RCRCAR_IMG_FILTER_13 = By.id("ctl44_Report_filter_13");
	public final static By RCRCAR_IMG_FILTER_14 = By.id("ctl44_Report_filter_14");
	public final static By RCRCAR_IMG_FILTER_15 = By.id("ctl44_Report_filter_15");
	public final static By RCRCAR_IMG_FILTER_16 = By.id("ctl44_Report_filter_16");
	public final static By RCRCAR_IMG_FILTER_17 = By.id("ctl44_Report_filter_17");
	public final static By RCRCAR_IMG_FILTER_18 = By.id("ctl44_Report_filter_18");
	public final static By RCRCAR_IMG_FILTER_19 = By.id("ctl44_Report_filter_19");
	public final static By RCRCAR_IMG_FILTER_20 = By.id("ctl44_Report_filter_20");
	public final static By RCRCAR_IMG_FILTER_21 = By.id("ctl44_Report_filter_21");
	public final static By RCRCAR_IMG_FILTER_22 = By.id("ctl44_Report_filter_22");
	public final static By RCRCAR_IMG_FILTER_23 = By.id("ctl44_Report_filter_23");
	public final static By RCRCAR_IMG_FILTER_24 = By.id("ctl44_Report_filter_24");
	
	public final static By RCRCAR_TH_CONTRACTID = By.id("ctl44_Report_sort_0");
	public final static By RCRCAR_TH_LINE = By.id("ctl44_Report_sort_1");
	public final static By RCRCAR_TH_ASSET_TYPE = By.id("ctl44_Report_sort_2");
	public final static By RCRCAR_TH_MANUFACTURER  = By.id("ctl44_Report_sort_3");
	public final static By RCRCAR_TH_MODEL = By.id("ctl44_Report_sort_4");
	public final static By RCRCAR_TH_SERIAL_NUMBER = By.id("ctl44_Report_sort_5");
	public final static By RCRCAR_TH_STATUS = By.id("ctl44_Report_sort_6");
	public final static By RCRCAR_TH_BILLING_AMT_PERIOD = By.id("ctl44_Report_sort_7");
	public final static By RCRCAR_TH_DESCRIPTION = By.id("ctl44_Report_sort_8");
	public final static By RCRCAR_TH_SLA = By.id("ctl44_Report_sort_9");
	public final static By RCRCAR_TH_CONTRACT_START = By.id("ctl44_Report_sort_10");
	public final static By RCRCAR_TH_CONTRACT_END = By.id("ctl44_Report_sort_11");
	public final static By RCRCAR_TH_SMS_COVERED = By.id("ctl44_Report_sort_12");
	public final static By RCRCAR_TH_COMPANY = By.id("ctl44_Report_sort_13");
	public final static By RCRCAR_TH_OPERATION = By.id("ctl44_Report_sort_14");
	public final static By RCRCAR_TH_FUNCTION = By.id("ctl44_Report_sort_15");
	public final static By RCRCAR_TH_APPROVER = By.id("ctl44_Report_sort_16");
	public final static By RCRCAR_TH_EQUIP_CONTACT = By.id("ctl44_Report_sort_17");
	public final static By RCRCAR_TH_ADMINISRATOR = By.id("ctl44_Report_sort_18");
	public final static By RCRCAR_TH_ADDRESS_NAME = By.id("ctl44_Report_sort_19");
	public final static By RCRCAR_TH_ADDRESS_LINE_1 = By.id("ctl44_Report_sort_20");
	public final static By RCRCAR_TH_CITY = By.id("ctl44_Report_sort_21");
	public final static By RCRCAR_TH_STATE = By.id("ctl44_Report_sort_22");
	public final static By RCRCAR_TH_POSTAL_CODE = By.id("ctl44_Report_sort_23");
	public final static By RCRCAR_TH_COUNTRY = By.id("ctl44_Report_sort_24");
	
	public static void enterReportsCustomReportsCobAssetReportPage() {
		SpReportsDefaultPageUtil.enterReportsDefaultPage();
		SeleniumUtil.click(SeleniumUtil.getCachedElement(SpReportsDefaultPageUtil.RD_LINK_COB_ASSET_REPORT));
		waitForPageToLoad();
	}
	
	public static void waitForPageToLoad() {
		SeleniumUtil.selectDefaultContent();
		SeleniumUtil.selectFrame(SpHomePageUtil.HOME_FRAME_CONTENT_NAME);
		SeleniumUtil.selectFrame(SpHomePageUtil.HOME_FRAME_REPORTS_NAME);
		SeleniumUtil.waitOnElements(new By[]{
				RCRCAR_IMG_EXPORT, RCRCAR_INPUT_FIRST, RCRCAR_INPUT_PREVIOUS, RCRCAR_INPUT_NEXT, RCRCAR_INPUT_LAST,
				RCRCAR_IMG_FILTER_0, RCRCAR_IMG_FILTER_1, RCRCAR_IMG_FILTER_2, RCRCAR_IMG_FILTER_3, RCRCAR_IMG_FILTER_4,
				RCRCAR_IMG_FILTER_5, RCRCAR_IMG_FILTER_6, RCRCAR_IMG_FILTER_7, RCRCAR_IMG_FILTER_8, RCRCAR_IMG_FILTER_9,
				RCRCAR_IMG_FILTER_10, RCRCAR_IMG_FILTER_11, RCRCAR_IMG_FILTER_12, RCRCAR_IMG_FILTER_13, RCRCAR_IMG_FILTER_14,
				RCRCAR_IMG_FILTER_15, RCRCAR_IMG_FILTER_16, RCRCAR_IMG_FILTER_17, RCRCAR_IMG_FILTER_18, RCRCAR_IMG_FILTER_19,
				RCRCAR_IMG_FILTER_20, RCRCAR_IMG_FILTER_21, RCRCAR_IMG_FILTER_22, RCRCAR_IMG_FILTER_23, RCRCAR_IMG_FILTER_24
			});
		SeleniumUtil.isDisplayed(SeleniumUtil.findElement(RCRCAR_IMG_EXPORT));
		SeleniumUtil.isDisplayed(SeleniumUtil.findElement(RCRCAR_INPUT_FIRST));
		SeleniumUtil.isDisplayed(SeleniumUtil.findElement(RCRCAR_INPUT_PREVIOUS));
		SeleniumUtil.isDisplayed(SeleniumUtil.findElement(RCRCAR_INPUT_NEXT));
		SeleniumUtil.isDisplayed(SeleniumUtil.findElement(RCRCAR_INPUT_LAST));
		SeleniumUtil.isDisplayed(SeleniumUtil.findElement(RCRCAR_IMG_FILTER_0));
		SeleniumUtil.isDisplayed(SeleniumUtil.findElement(RCRCAR_IMG_FILTER_1));
		SeleniumUtil.isDisplayed(SeleniumUtil.findElement(RCRCAR_IMG_FILTER_2));
		SeleniumUtil.isDisplayed(SeleniumUtil.findElement(RCRCAR_IMG_FILTER_3));
		SeleniumUtil.isDisplayed(SeleniumUtil.findElement(RCRCAR_IMG_FILTER_4));
		SeleniumUtil.isDisplayed(SeleniumUtil.findElement(RCRCAR_IMG_FILTER_5));
		SeleniumUtil.isDisplayed(SeleniumUtil.findElement(RCRCAR_IMG_FILTER_6));
		SeleniumUtil.isDisplayed(SeleniumUtil.findElement(RCRCAR_IMG_FILTER_7));
		SeleniumUtil.isDisplayed(SeleniumUtil.findElement(RCRCAR_IMG_FILTER_8));
		SeleniumUtil.isDisplayed(SeleniumUtil.findElement(RCRCAR_IMG_FILTER_9));
		SeleniumUtil.isDisplayed(SeleniumUtil.findElement(RCRCAR_IMG_FILTER_10));
		SeleniumUtil.isDisplayed(SeleniumUtil.findElement(RCRCAR_IMG_FILTER_11));
		SeleniumUtil.isDisplayed(SeleniumUtil.findElement(RCRCAR_IMG_FILTER_12));
		SeleniumUtil.isDisplayed(SeleniumUtil.findElement(RCRCAR_IMG_FILTER_13));
		SeleniumUtil.isDisplayed(SeleniumUtil.findElement(RCRCAR_IMG_FILTER_14));
		SeleniumUtil.isDisplayed(SeleniumUtil.findElement(RCRCAR_IMG_FILTER_15));
		SeleniumUtil.isDisplayed(SeleniumUtil.findElement(RCRCAR_IMG_FILTER_16));
		SeleniumUtil.isDisplayed(SeleniumUtil.findElement(RCRCAR_IMG_FILTER_17));
		SeleniumUtil.isDisplayed(SeleniumUtil.findElement(RCRCAR_IMG_FILTER_18));
		SeleniumUtil.isDisplayed(SeleniumUtil.findElement(RCRCAR_IMG_FILTER_19));
		SeleniumUtil.isDisplayed(SeleniumUtil.findElement(RCRCAR_IMG_FILTER_20));
		SeleniumUtil.isDisplayed(SeleniumUtil.findElement(RCRCAR_IMG_FILTER_21));
		SeleniumUtil.isDisplayed(SeleniumUtil.findElement(RCRCAR_IMG_FILTER_22));
		SeleniumUtil.isDisplayed(SeleniumUtil.findElement(RCRCAR_IMG_FILTER_23));
		SeleniumUtil.isDisplayed(SeleniumUtil.findElement(RCRCAR_IMG_FILTER_24));
	}
}
